import {LGXEnums}  from "../../common/sysenum";


import { DisCrossPtSvc } from "./subsvc/discrossptsvc";
import { DisMidPtSvc } from "./subsvc/dismidptsvc";
import { DisCenterPtSvc } from "./subsvc/discenterptsvc";
import { DisEndPtSvc } from "./subsvc/disendptsvc";
import { DisPtOnGraphSvc } from "./subsvc/disptongraphsvc";
import { DisTangentPtSvc } from "./subsvc/distangentptsvc";

var AuxPointDisSvcFactory = {}
AuxPointDisSvcFactory.create = function (kind) {
    let svc = null;
    switch (kind) {
        case LGXEnums.AuxPointKind.end://端点
            svc = new DisEndPtSvc();
            break;

        case LGXEnums.AuxPointKind.lineMid://线段中点
            svc = new DisMidPtSvc();
            break;

        case LGXEnums.AuxPointKind.center://圆心
            svc = new DisCenterPtSvc();
            break;

        case LGXEnums.AuxPointKind.tangentPt://圆上切点
            svc = new DisTangentPtSvc();
            break;

        case LGXEnums.AuxPointKind.commonPt://图上无特殊意义的普通点
            svc = new DisPtOnGraphSvc();
            break;

        case LGXEnums.AuxPointKind.cross://图形之间交点
            svc = new DisCrossPtSvc();
            break;
    }
    return svc;
}
export { AuxPointDisSvcFactory }